<header class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <%= link_to "LA2ETLAK",'#', id: "logo" %>

        <form class="navbar-search pull-left" action="/admins/search">
          <input type="text" class="search-query" placeholder="Search User" name="query">
        </form>
        </div>
      </div>
</header>
<h1 class= "statistics-component-text" style= "margin-left: 20px;">
	<% if @story.title.nil? %>
	<%= "No Title Available" %>
	<% else %>
	Story Title: 
	<%= @story.title  %>
	<%  end %></h1>
<br/>
<div class="accordion" id="accordion1">
	<div class="accordion-group">
		<div class="accordion-heading">
			<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseThree">
			<h3 class="statistics-component-text">Story State</h3>
			</a>
		</div>
		<div id="collapseThree" class="accordion-body collapse" style= "margin-left: 20px;">
				<% if !(@story.deleted || @story.hidden) %>
					<ul class="nav nav-list">
					<li class="nav-header">Status :</li>
					<li><span class="greenbadge">Active</span></li>
				<% elsif @story.deleted %>
					<ul class="nav nav-list">
					<li class="nav-header">Status :</li>
					<li><span class="redbadge">Deleted</span></li>
				<% elsif @story.hidden %>
					<ul class="nav nav-list">
					<li class="nav-header">Status :</li>
					<li><span class="yellowbadge">Hidden</span></li>
				<% end %>
				<li class="nav-header">Date :</li>
				<li><%= @story.created_at.to_date %></li>
				<li class="nav-header">Rank :</li>
				<li><%= @story.rank %></li>
				<li class="nav-header">Interest Name :</li>
				<li><%= Interest.find(@story.interest_id).name %></li>
		</div>
	</div>
	<div class="accordion-group">
		<div class="accordion-heading">
			<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne">
			<h3 class="statistics-component-text">Content</h3>
			</a>
		</div>
		<div id="collapseOne" class="accordion-body collapse in" style= "margin-left: 20px;">
			<% if !(@story.content.nil? || @story.content=="") %>
			<p><font size="5"><%=raw @story.content %></p>
			<%else%>
			<p><font size="3">No content</p>
			<%end%>
		</div>
	</div>
	<div class="accordion-group">
		<div class="accordion-heading">
			<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseTwo">
			<h3 class="statistics-component-text">Comments</h3>
			</a>
		</div>
		<div id="collapseTwo" class="accordion-body collapse" style= "margin-left: 20px;">
			<% if !(@comments.nil? || @comments.empty?) %>
				<% @comments.each do |comment| %>
					<h3><%= User.find(comment.user_id).name %></h3>
					<p><font size="2"><%= comment.content %></p>
				<%end%>
			<%else%>
			<p><font size="3">No comments</p>
			<%end%>	
		</div>
	</div>
</div>
